package org.mq.mymq.broker.core;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @ClassName ConsumerQueueMMapFileModelManager
 * @Description ConsumerQueue的mmap映射对象的管理器
 * @Author jiarong_ye
 * @Date 2025/6/16 20:14
 * @Version 1.0
 */
public class ConsumerQueueMMapFileModelManager {
    public Map<String, List<ConsumeQueueMMapFileModel>> consumerQueueMMapFileModels = new HashMap<>();

    public List<ConsumeQueueMMapFileModel> get(String topic) {
        return consumerQueueMMapFileModels.get(topic);
    }

    public void put(String topic, List<ConsumeQueueMMapFileModel> consumeQueueMMapFileModels) {
        this.consumerQueueMMapFileModels.put(topic, consumeQueueMMapFileModels);
    }

    public Map<String, List<ConsumeQueueMMapFileModel>> getConsumerQueueMMapFileModels() {
        return consumerQueueMMapFileModels;
    }
}
